import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class GameWindow extends JFrame{

    private static int WINDOW_WIDTH  = 1000;
    private static int WINDOW_HEIGHT = 600;

    private static int GAME_WINDOW_WIDTH  = 1000;
    private static int GAME_WINDOW_HEIGHT = 600;


    private GameEngine gameEngine;
    

    public GameWindow(){
	super();

	this.setSize(WINDOW_WIDTH,WINDOW_HEIGHT);
	this.setResizable(false);
	this.setTitle("Age Of War");
	this.setLocationRelativeTo(null);
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	
	gameEngine = new GameEngine(GAME_WINDOW_WIDTH,GAME_WINDOW_HEIGHT);
	
	//container.setPreferredSize(new Dimension(GAME_WINDOW_HEIGHT,height));
	
	gameEngine.setFocusable(true);
	//gameEngine.requestFocusInWindow();
	
	this.setContentPane(gameEngine);
	this.setVisible(true);

    }

    public static void main(String []argv){
	GameWindow game = new GameWindow();
	game.start();
    }


    private void start(){
	/*while(true){
	    container.repaint();
	    try{
		Thread.sleep(10);
		}catch(Exception e){System.out.println("pb");}
	    }*/
	gameEngine.updateCycle();
    }


}